
var User = require('../../models/model.js');
var express = require('express');
var router = express.Router();


  router.post('/register', function(req, res) {
    if (!req.body) return res.sendStatus(400);
    var users =[{
      username: req.body.username,
      password:req.body.password
    }];
    User.create(users,function (err) {
      if(err) return console.log(err);
      console.log(req.body.username);
      console.log(req.body.password);
      res.send({result:{"status":200}})
    });
  });

module.exports =  router;



